package com.lb.qqzonepullview;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ImageView;


public class MainActivity extends Activity {
    private PullListView listview;
    private ImageView head_big;
    private ImageView head_small;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        listview = (PullListView) findViewById(R.id.listview);

        ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1,
                new String[] {"test1", "test2", "test3", "test4", "test5", "test6", "test7",
                        "test8", "test9", "test10", "test11", "test12"});
        listview.setAdapter(adapter);

        View headerView = getLayoutInflater().inflate(R.layout.view_header, null);
        listview.addHeaderView(headerView);
        head_big = (ImageView) headerView.findViewById(R.id.iv_head_big);
        head_small = (ImageView) headerView.findViewById(R.id.iv_head_small);
        listview.setHeadSmall(head_small);
        listview.setHeadBig(head_big);
    }


}
